#include "BoneOrientationNode.h"
#include "BoneOrientationNodeList.h"
BoneOrientationNode::BoneOrientationNode(BoneOrientation * boneOrientation)
{
	outgoingBoneOrientationNodes = NULL;
	this->boneOrientation = boneOrientation;
}
BoneOrientationNode::~BoneOrientationNode()
{
	if(boneOrientation)
	{
		delete(boneOrientation);
		boneOrientation = NULL;
	}
	if(outgoingBoneOrientationNodes)
	{
		delete(outgoingBoneOrientationNodes);
		outgoingBoneOrientationNodes = NULL;
	}
}
void BoneOrientationNode::Add(BoneOrientationNode * boneOrientationNode)
{
	if(outgoingBoneOrientationNodes)
			outgoingBoneOrientationNodes->Add(boneOrientationNode);
	else
		outgoingBoneOrientationNodes = new BoneOrientationNodeList(boneOrientationNode);
}
BoneOrientation * BoneOrientationNode::GetOrientation()
{
	return boneOrientation;
}
BoneOrientationNodeList * BoneOrientationNode::GetOutgoingNodeList()
{
	return outgoingBoneOrientationNodes;
}